package com.example.activitylanchmode;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.util.Log;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public abstract class BaseActivity extends AppCompatActivity {
    String TAG ="BaseActivity";
    Context mContext =this;


    @Override
    protected void onResume() {
        super.onResume();
        Log.d(TAG, this.getClass().getName() + "    onResume");
    }



  public  void setJumpMain(View v){
        v.findViewById(R.id.tv_main).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mContext.startActivity(new Intent(mContext,MainActivity.class));
            }
        });
    }


    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        Log.d(TAG, this.getClass().getName() + "    onNewIntent");
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d(TAG, this.getClass().getName() + "    onCreate");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d(TAG,this.getClass().getName()+"   onDestroy");
    }
}
